<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<head>
    <th:block th:include="include :: header('修改传感器数数据')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-tVartriver-edit" th:object="${tVartriver}">
        <input id="id" name="id" th:value="${id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">设备id：</label>
            <div class="col-sm-8">
                <input id="deviceId" name="deviceId" th:value="${deviceId}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">手动控制：</label>
            <div class="col-sm-8">
                <select name="manualControl" th:field="*{manualControl}" class="form-control">
                    <option value="0">否</option>
                    <option value="1">是</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">组合：</label>
            <div class="col-sm-8">
                <select name="zuhe" th:field="*{zuhe}" class="form-control">
                    <option value="1256">Channel1256</option>
                    <option value="3478">Channel3478</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">空气温度(channel)：</label>
            <div class="col-sm-8">
                <input id="channel1" name="channel1" th:field="*{channel1}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">空气湿度(channe2)：</label>
            <div class="col-sm-8">
                <input id="channel2" name="channel2" th:field="*{channel2}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">空气温度(channe3)：</label>
            <div class="col-sm-8">
                <input id="channel3" name="channel3" th:field="*{channel3}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">空气湿度(channe4)：</label>
            <div class="col-sm-8">
                <input id="channel4" name="channel4" th:field="*{channel4}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">土壤水分(channel5)：</label>
            <div class="col-sm-8">
                <input id="channel5" name="channel5" th:field="*{channel5}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">土壤温度(channel6)：</label>
            <div class="col-sm-8">
                <input id="channel6" name="channel6" th:field="*{channel6}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">土壤水分(channel7)：</label>
            <div class="col-sm-8">
                <input id="channel7" name="channel7" th:field="*{channel7}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">土壤温度(channel8)：</label>
            <div class="col-sm-8">
                <input id="channel8" name="channel8" th:field="*{channel8}" class="form-control" type="text">
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-3 control-label">雨量(channel17)：</label>
            <div class="col-sm-8">
                <input id="channel17" name="channel17" th:field="*{channel17}" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "system/tVartriver";
    $("#form-tVartriver-edit").validate({
        rules: {
            xxxx: {
                required: true,
            },
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-tVartriver-edit').serialize());
        }
    }
</script>
</body>
</html>
